package com.yuju.rpt.enums;

public enum BusinessDailyReturnCodeEnum {
	
	BUSENESSDAILY_SAVE_SUCCESS("yuju-businessDaily-1001", "营业日报保存成功"),
	BUSENESSDAILY_SAVE_FAILURE("yuju-businessDaily-1002", "营业日报保存失败"),
	BUSENESSDAILY_GET_SUCCESS("yuju-businessDaily-1003", "营业日报查询成功"),
	BUSENESSDAILY_GET_FAILURE("yuju-businessDaily-1004", "营业日报查询失败");
	
	private String code;
	private String desc;
	
	BusinessDailyReturnCodeEnum(String code, String desc) {
		this.code = code;
		this.desc = desc;
	}
	
	public static String getDescByCode(String code) {
		for (BusinessDailyReturnCodeEnum enume : BusinessDailyReturnCodeEnum.values()) {
			if (enume.getCode().equals(code)) {
				return enume.getDesc();
			}
		}
		
		return "未知枚举类型";
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
	
}
